package com.yunxi.controller.eai;

import com.yunxi.bizToHub.pojo.CanSendResourcesVO;
import com.yunxi.bizToHub.pojo.DespatchOrderAuditVO;
import com.yunxi.bizToHub.service.DespatchOrderDubboService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created by Administrator on 2019/7/12.
 */
@RestController
@RequestMapping("/esb/api")
@Api(tags = "esb:manage", description = "接收esb信息")
public class TmsController {

    @Autowired
    private DespatchOrderDubboService despatchOrderDubboServiceImpl;

    @PostMapping("/despatchOrderAuditPms2Tms")
    @ApiOperation(value = "发运单审核信息")
    public Object despatchOrderAuditPms2Tms(@RequestBody List<DespatchOrderAuditVO> order) throws Exception {

        Object object=despatchOrderDubboServiceImpl.despatchOrderAuditPms2Tms(order);
        return object;
    }


    @PostMapping("/canSendResourcesPms2Tms")
    @ApiOperation(value = "可发资源信息")
    public Object canSendResourcesPms2Tms(@RequestBody List<CanSendResourcesVO> order) throws Exception {

        Object object=despatchOrderDubboServiceImpl.canSendResourcesPms2Tms(order);
        return object;
    }
}
